#include<stdio.h>

unsigned int my_strlen(char *str)
{
	int n=0;
	if (*str=='\n'||*str==' ')
		return n;
	while ((*(str+n)!='\0'))
		n++;
	return n;
}

int main()
{
	char a[2000];
	gets(a);
	int x;
	x=my_strlen(a);
	printf("%d\n",x);
	return 0;
}
